﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="ColorPallete.xaml"/>
		<ResourceDictionary Source="Fonts.xaml"/>
	</ResourceDictionary.MergedDictionaries>
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="DefaultDataGrid" TargetType="sdk:DataGrid">
		<Setter Property="RowBackground" Value="Transparent"/>
		<Setter Property="AlternatingRowBackground" Value="#00FFFFFF"/>
		<Setter Property="Background" Value="{StaticResource ControlBackground}"/>
		<Setter Property="HeadersVisibility" Value="Column"/>
		<Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
		<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="SelectionMode" Value="Extended"/>
		<Setter Property="CanUserReorderColumns" Value="True"/>
		<Setter Property="CanUserResizeColumns" Value="True"/>
		<Setter Property="CanUserSortColumns" Value="True"/>
		<Setter Property="AutoGenerateColumns" Value="True"/>
		<Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
		<Setter Property="BorderBrush" Value="{StaticResource Border}"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="DragIndicatorStyle">
			<Setter.Value>
				<Style TargetType="ContentControl">
					<Setter Property="Foreground" Value="#7FFFFFFF"/>
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="ContentControl">
								<Grid>
									<VisualStateManager.VisualStateGroups>
										<VisualStateGroup x:Name="SortStates">
											<VisualState x:Name="Unsorted"/>
											<VisualState x:Name="SortAscending">
												<Storyboard>
													<DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
												</Storyboard>
											</VisualState>
											<VisualState x:Name="SortDescending">
												<Storyboard>
													<DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
													<DoubleAnimation Duration="0" To="-.9" Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon"/>
												</Storyboard>
											</VisualState>
										</VisualStateGroup>
									</VisualStateManager.VisualStateGroups>
									<Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="#66808080" Stretch="Fill"/>
									<Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2" Opacity="0" Stretch="Fill">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
												<GradientStop Color="#FFFFFFFF" Offset="0.015"/>
												<GradientStop Color="#F9FFFFFF" Offset="0.375"/>
												<GradientStop Color="#E5FFFFFF" Offset="0.6"/>
												<GradientStop Color="#C6FFFFFF" Offset="1"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
									<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
										<Grid.ColumnDefinitions>
											<ColumnDefinition/>
											<ColumnDefinition Width="Auto"/>
										</Grid.ColumnDefinitions>
										<ContentPresenter Content="{TemplateBinding Content}"/>
										<Path x:Name="SortIcon" Grid.Column="1" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " Fill="#7FFFFFFF" HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
											<Path.RenderTransform>
												<ScaleTransform ScaleY=".9" ScaleX=".9"/>
											</Path.RenderTransform>
										</Path>
									</Grid>
								</Grid>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="DropLocationIndicatorStyle">
			<Setter.Value>
				<Style TargetType="ContentControl">
					<Setter Property="Background" Value="#FF3F4346"/>
					<Setter Property="Width" Value="2"/>
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="ContentControl">
								<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="GridLinesVisibility" Value="None"/>
		<Setter Property="HorizontalGridLinesBrush" Value="#FFC9CACA"/>
		<Setter Property="IsTabStop" Value="True"/>
		<Setter Property="VerticalGridLinesBrush" Value="#FFC9CACA"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:DataGrid">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Style="{StaticResource DefaultBorder}">
							<Grid x:Name="Root" Background="{TemplateBinding Background}">
								<Grid.Resources>
									<ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
										<Grid x:Name="Root">
											<Grid.RowDefinitions>
												<RowDefinition/>
												<RowDefinition/>
												<RowDefinition Height="Auto"/>
											</Grid.RowDefinitions>
											<Border BorderBrush="#FFC9CACA" BorderThickness="0,0,1,0" Background="#FF1F3B53" Grid.RowSpan="2">
												<Rectangle Stretch="Fill" StrokeThickness="1">
													<Rectangle.Fill>
														<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
															<GradientStop Color="#FCFFFFFF" Offset="0.015"/>
															<GradientStop Color="#F7FFFFFF" Offset="0.375"/>
															<GradientStop Color="#E5FFFFFF" Offset="0.6"/>
															<GradientStop Color="#D1FFFFFF" Offset="1"/>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
											</Border>
											<Rectangle Fill="#FFDBDCDC" Height="1" Grid.RowSpan="2" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto"/>
										</Grid>
									</ControlTemplate>
									<ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
										<Grid x:Name="RootElement">
											<Grid.RowDefinitions>
												<RowDefinition/>
												<RowDefinition/>
												<RowDefinition Height="Auto"/>
											</Grid.RowDefinitions>
											<Border BorderBrush="#FFC9CACA" BorderThickness="1,0,0,0" Background="#FF1F3B53" Grid.RowSpan="2">
												<Rectangle Stretch="Fill">
													<Rectangle.Fill>
														<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
															<GradientStop Color="#FCFFFFFF" Offset="0.015"/>
															<GradientStop Color="#F7FFFFFF" Offset="0.375"/>
															<GradientStop Color="#E5FFFFFF" Offset="0.6"/>
															<GradientStop Color="#D1FFFFFF" Offset="1"/>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
											</Border>
										</Grid>
									</ControlTemplate>
								</Grid.Resources>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<sdk:DataGridColumnHeader x:Name="TopLeftCornerHeader" Template="{StaticResource TopLeftHeaderTemplate}" Width="22"/>
								<sdk:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter" Grid.Column="1"/>
								<sdk:DataGridColumnHeader x:Name="TopRightCornerHeader" Grid.Column="2" Template="{StaticResource TopRightHeaderTemplate}"/>
								<Rectangle x:Name="ColumnHeadersAndRowsSeparator" Grid.ColumnSpan="3" Height="1" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto"/>
								<sdk:DataGridRowsPresenter x:Name="RowsPresenter" Grid.ColumnSpan="2" Grid.Row="1"/>
								<Rectangle x:Name="BottomRightCorner" Grid.Column="2" Fill="#FFE9EEF4" Grid.Row="2"/>
								<Rectangle x:Name="BottomLeftCorner" Grid.ColumnSpan="2" Fill="#FFE9EEF4" Grid.Row="2"/>
								<ScrollBar x:Name="VerticalScrollbar" Grid.Column="2" Margin="0,-1,-1,-1" Orientation="Vertical" Grid.Row="1" Width="18"/>
								<Grid Grid.Column="1" Grid.Row="2">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition/>
									</Grid.ColumnDefinitions>
									<Rectangle x:Name="FrozenColumnScrollBarSpacer"/>
									<ScrollBar x:Name="HorizontalScrollbar" Grid.Column="1" Height="18" Margin="-1,0,-1,-1" Orientation="Horizontal"/>
								</Grid>
								<sdk:ValidationSummary x:Name="ValidationSummary" Grid.ColumnSpan="3" MaxHeight="90" Grid.Row="3"/>
							</Grid>
						</Border>
						<Border x:Name="DisabledVisualElement" Background="#8CFFFFFF" HorizontalAlignment="Stretch" Height="Auto" IsHitTestVisible="False" Opacity="0" VerticalAlignment="Stretch" Width="Auto"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="FontFamily" Value="{StaticResource AppFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
		<Setter Property="Foreground" Value="{StaticResource Foreground}"/>
	</Style>
	<Style x:Key="DefaultDataGridColumnHeader" TargetType="sdk:DataGridColumnHeader">
		<Setter Property="Foreground" Value="{StaticResource Foreground}"/>
		<Setter Property="HorizontalContentAlignment" Value="Left"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="SeparatorBrush" Value="{StaticResource Border}"/>
		<Setter Property="Padding" Value="4"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:DataGridColumnHeader">
					<Grid x:Name="Root">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">

									<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundGradient" d:IsOptimized="True"/>
									</Storyboard>

								</VisualState>
								<VisualState x:Name="Pressed"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="SortStates">
								<VisualState x:Name="Unsorted"/>
								<VisualState x:Name="SortAscending">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="SortDescending">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
										<DoubleAnimation Duration="0" To="-.9" Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="{StaticResource ControlBackgroundDark}" Stretch="Fill"/>
						<Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2" Stretch="Fill" Fill="{StaticResource ControlBackground}" Opacity="0"/>
						<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
							<Grid.ColumnDefinitions>
								<ColumnDefinition/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
							<ContentPresenter Content="{TemplateBinding Content}"/>
							<Path x:Name="SortIcon" Grid.Column="1" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " Fill="{StaticResource Accent}" HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
								<Path.RenderTransform>
									<ScaleTransform ScaleY=".9" ScaleX=".9"/>
								</Path.RenderTransform>
							</Path>
						</Grid>
						<Rectangle x:Name="VerticalSeparator" Grid.Column="1" Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" VerticalAlignment="Stretch" Width="1"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="FontFamily" Value="{StaticResource AppFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource ControlContentFontSize}"/>
	</Style>
	<Style x:Key="DefaultDataGridRow" TargetType="sdk:DataGridRow">
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:DataGridRow">
					<sdk:DataGridFrozenGrid x:Name="Root" Margin="0">
						<sdk:DataGridFrozenGrid.Resources>
							<Storyboard x:Key="DetailsVisibleTransition">
								<DoubleAnimation Duration="00:00:0.1" Storyboard.TargetProperty="ContentHeight" Storyboard.TargetName="DetailsPresenter"/>
							</Storyboard>
						</sdk:DataGridFrozenGrid.Resources>
						<sdk:DataGridFrozenGrid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>
						</sdk:DataGridFrozenGrid.ColumnDefinitions>
						<sdk:DataGridFrozenGrid.RowDefinitions>
							<RowDefinition/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</sdk:DataGridFrozenGrid.RowDefinitions>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="NormalAlternatingRow">
									<Storyboard>
										<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseOver">
									
								</VisualState>
								<VisualState x:Name="NormalSelected">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseOverSelected">
										<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="UnfocusedSelected">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
										<ColorAnimation Duration="0" To="{StaticResource ResourceKey=ListInactiveSelectionColor}" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="BackgroundRectangle"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="Valid"/>
								<VisualState x:Name="Invalid">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackgroundRectangle">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="{StaticResource Accent}" Opacity="0" Grid.RowSpan="2"/>
						<Rectangle x:Name="InvalidVisualElement" Grid.ColumnSpan="2" Fill="#FFF7D8DB" Opacity="0" Grid.RowSpan="2"/>
						<sdk:DataGridRowHeader x:Name="RowHeader" sdk:DataGridFrozenGrid.IsFrozen="True" Grid.RowSpan="3"/>
						<sdk:DataGridCellsPresenter x:Name="CellsPresenter" Grid.Column="1" sdk:DataGridFrozenGrid.IsFrozen="True"/>
						<sdk:DataGridDetailsPresenter x:Name="DetailsPresenter" Grid.Column="1" Grid.Row="1"/>
						<Rectangle x:Name="BottomGridLine" Grid.Column="1" HorizontalAlignment="Stretch" Height="1" Grid.Row="2"/>
					</sdk:DataGridFrozenGrid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="DefaultDataGridCell" TargetType="sdk:DataGridCell">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:DataGridCell">
					<Grid x:Name="Root" Background="{TemplateBinding Background}">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CurrentStates">
								<VisualState x:Name="Regular"/>
								<VisualState x:Name="Current">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="Valid"/>
								<VisualState x:Name="Invalid">
									<Storyboard>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
										<ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="FocusVisual"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="FocusVisual" Fill="#4CFFFFFF" HorizontalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" StrokeThickness="0" VerticalAlignment="Stretch"/>
						<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						<Rectangle x:Name="InvalidVisualElement" HorizontalAlignment="Stretch" IsHitTestVisible="False" Opacity="0" Stroke="#FFDC000C" StrokeThickness="1" VerticalAlignment="Stretch"/>
						<Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>